<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>登录</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<jsp:include page="/scripts/jquery/index.html"></jsp:include>
<jsp:include page="/scripts/bootstrap/index.html"></jsp:include>
<link rel="stylesheet" href="/style/default.css">
</head>
<script type="text/javascript">
	function doLogin() {
		$.ajax({
				type : 'POST' ,
				url : 'page/system/manage/Login/doLogin' ,
				data : $('#MyForm').serialize() ,
				dataType : "json" ,
				async : true ,
				cache : false ,
				jsonpCallback : "null" ,
				//beforeSend : function(response, status, statusText) {
				//alert(response + ":" + status + ":" + statusText);
				//} ,
				//dataFilter : function(response, status, statusText) {
				//alert(response + ":" + status + ":" + statusText);
				//} ,
				success : function(response, status, statusText) {
					//alert(response + ":" + status + ":" + statusText);
					if (response.status) {
						///	alert(response.content);
						location.href = "${basePath}page/system/manage/Index/";
					} else {
						alert(response.content);
					}
				} ,
				error : function(response, status, statusText) {
					//alert(response + ":" + status + ":" + statusText);
				} ,
				complete : function(response, status, statusText) {
					//alert(response + ":" + status + ":" + statusText);
				}
		});
	}
</script>
<body style="background:#ffffff">
	<form id="MyForm" method="post">
		<div style="background:url(${basePath}image/loginBackground.jpg);width:100%;height:97%;border:1px solid #ffffff;text-align:center">
			<div style="margin-top: 10%">
				<span style="color:#ed7d31;font-size:33px;font-weight: bold;font-family: Arial, '微软雅黑', '宋体'">产品名称XXXXXXX</span>
			</div>
			<table border="0" style="background:url(${basePath}image/back.png);width:560px;height:340px;border:0px solid red;margin:auto;">
				<tr>
					<td style="height:14%;width:40%" rowspan="5">
						<div style="border-radius:180px;border:5px solid #dbdbdb;width:130px;height:130px;margin-left:25%;margin-top:25%" align="center">
							<span style="position:relative;top:30%;color:#dbdbdb;font-size:35px;font-weight:bold">logo</span>
						</div>
					</td>
					<td style="height:14%;width:10%"></td>
					<td style="height:14%;width:39%"></td>
					<td style="height:14%;width:11%" rowspan="5"></td>
				</tr>
				<tr>
					<td align="right" style="height:12%"><span>登录名:</span></td>
					<td align="right"><input type="text" class="form-control" name="u" value="admin"></td>
				</tr>
				<tr>
					<td align="right" style="height:12%"><span>密&nbsp;&nbsp;&nbsp;码:</span></td>
					<td align="right"><input type="text" class="form-control" name="p" value="admin"></td>
				</tr>
				<tr>
					<td align="right" style="height:12%"><span>验证码:</span></td>
					<td align="right"><span style="width:45%;float:right;border:1px solid #dbdbdb;height:30px">&nbsp;</span> <span style="width:3%;float:right">&nbsp;</span> <input type="text" class="form-control" style="width:50%;float:right" name="p"></td>
				</tr>
				<tr>
					<td align="right" style="height:12%"><input type="checkbox" style="border-radius:4px" /></td>
					<td align="right"><span style="float:right;width:67%"><a href="#">看不清？换一张</a></span> <span style="float:right;width:33%">记住密码</span></td>
				</tr>
				<tr>
					<td colspan="4" align="right" style="height:10%">
						<hr style="width:91.5%;border:1px solid #dbdbdb;">
					</td>
				</tr>
				<tr>
					<td></td>
					<td colspan="2" align="center">
						<button type="button" class="btn btn-primary" style="width:100px;margin-bottom:20%" onclick="doLogin()">登录</button> <input type="reset" class="btn btn-primary" style="width:100px;margin-bottom:20%" value="重置" />
					</td>
					<td></td>
				</tr>
			</table>
		</div>
	</form>
	<div style="display: none;">
		<iframe></iframe>
	</div>
</body>
</html>
